package com.yanqu.road.entity.activity.sonhai.config;

import com.yanqu.road.utils.string.StringUtils;

import java.util.ArrayList;
import java.util.List;

public class SonHaiMonsterConfig {

    /**
     * 活动id
     */
    private int activityId;

    /**
     * 事件ID
     */
    private int id;

    /**
     * 图标id
     */
    private int icon;

    /**
     * 名称
     */
    private String name;

    /**
     * 描述
     */
    private String desc;

    /**
     * 技能参数
     */
    private String param;
    private List<Integer> paramList = new ArrayList<>();

    /**
     * 等级
     */
    private int level;

    public int getActivityId() {
        return activityId;
    }

    public void setActivityId(int activityId) {
        this.activityId = activityId;
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public int getIcon() {
        return icon;
    }

    public void setIcon(int icon) {
        this.icon = icon;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getDesc() {
        return desc;
    }

    public void setDesc(String desc) {
        this.desc = desc;
    }

    public String getParam() {
        return param;
    }

    public void setParam(String param) {
        this.param = param;
        if (!StringUtils.isNullOrEmpty(param)) {
            String[] params = param.split("\\|");
            List<Integer> paramList = new ArrayList<>();
            for (String item : params) {
                paramList.add(Integer.parseInt(item));
            }
            this.paramList = paramList;
        }
    }

    public List<Integer> getParamList() {
        return paramList;
    }

    public int getLevel() {
        return level;
    }

    public void setLevel(int level) {
        this.level = level;
    }
}
